import React,{Component} from 'react';
import {
    View,
    Text,
    StyleSheet,
    Navigator
}from 'react-native';
import NavigationBar from '../common/NavigationBar';
import HomePage from './HomePage'

export default class WelcomePage extends Component{
    componentDidMount(){
        this.timer=setTimeout(()=>{
            this.props.navigator.resetTo({
                name: 'HomePage',
                component:HomePage,
            })
        },2000)
    }
    componentWillUnmount(){
        this.timer&&clearTimeout(this.timer);
    }
    render() {
        return <View style={styles.container}>
            <NavigationBar
                title={'欢迎'}
                />
              <Text>欢迎</Text>
            </View>
    }
}
const styles = StyleSheet.create({
    container:{
        flex:1,
    }
})